package javadany02;

import java.util.Random;

public class Homework1CopyArray {
	public static void main(String [] args){
		
		int[] arr1 = {1,2,3,4,5};
		int[] arr2 = {6,7,8,9,10};
		copyarr(arr1,arr2);
	}
	
	public static void copyarr(int[] arr1,int[] arr2){
		Random r = new Random();
		int[] arrcopy=new int[arr1.length];
		for(int i=0;i<arr1.length;i++){
			int suiji=r.nextInt(2);
			if(suiji==0){
				arrcopy[i]=arr1[i];
			}
			else{
				arrcopy[i]=arr2[i];
			}
			System.out.print(arrcopy[i]);
		}
		
	}


}
